# -*- coding: utf-8 -*-
# @description: 
# @File  : utils.py
# @Time  :2020-07-27 18:26:49
# @Author:selfeasy
# @Email :gm_selfeasy@163.com

from werkzeug.routing import Map, Rule

url_map = Map()

def expose(rule, **kwgs):
    def decorate(f):
        kwgs['endpoint'] = f.__name__
        url_map.add(Rule(rule, **kwgs))
        return f
    return decorate